// TOWN DIALOGUE SCRIPT
//    Town 94: Northpoint Lighthouse

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode; //
	tag = 1;
	condition = 1;
	text1 = "...";
	text2 = ".....";
	text3 = "....";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,3));
	break;
	
begintalknode; //
	tag = 2;
	condition = 1;
	text1 = "Gruh.";
	text2 = "Brains.";
	text3 = "Grahhrrr.";
	text4 = "Brains?";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,4));
	break;

// Nekaros

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Nekaros";
	text1 = "At first, you think this is just another skeleton wandering these halls, its bones covered with tattered mage's robes. Then you realize that it is a human. He just happens to be disturbingly pallid and thin.";
	text2 = "_I am Nekaros,_ he says, in a thin, reedy voice.";
	text5 = "Nekaros smiles. His teeth are gray. _How else can I help you?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_Are you in charge of this lighthouse?_";
	text1 = "_I maintain Northpoint Lighthouse,_ he hisses. _It gives me time to study my other pursuits._";

begintalknode;
	state = 2;
	nextstate = -1;
	condition = gf(94,12) == 0;
	question = "_What is the status of the lighthouse?_";
	text1 = "_Still operating at full efficiency. Whenever cockroaches get close, I send my undead hordes out to squish them. The light shines._";
	code =
		sf(94,12,1);
	break;
	
begintalknode;
	state = 2;
	nextstate = 3;
	question = "_Why is there a lighthouse here?_";
	text1 = "_The Empire maintains this lighthouse to warn the passing ships of the nearby rocks. None of this is interesting, of course, compared to my studies of death._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_What are your other pursuits?_";
	text1 = "_I am immersed in the study of the beauty of death._";

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_That is a morbid subject._";
	text1 = "His teeth are exposed in a ghastly grin. _I believe that, quite simply, Death Is Just Another Phase Of Life. Thus, creating undead is the most humane thing you can do._";

begintalknode;
	state = 4;
	nextstate = 5;
	question = "_I can think of more humane things, like leaving the dead dead._";
	text1 = "_But wouldn't you rather have your existence continued in a rather mundane way than have no existence at all? Creating undead gives people more life, and is a beautiful thing!_";
	text2 = "_Plus, they're so useful!_";

begintalknode;
	state = 5;
	nextstate = 6;
	question = "_Useful how?_";
	text1 = "He smiles. _Not only are the dead quiet, patient company, but they're very good at simple, household chores._";

begintalknode;
	state = 6;
	nextstate = -1;
	question = "_What can an undead creature be relied upon to do?_";
	text1 = "_You know, emptying trash, sweeping, feeding the lighthouse flame, that sort of thing. I'm sure that death can be very beautiful. All you need is a good attitude about housework._";

begintalknode;
	state = 1;
	nextstate = 7;
	condition = gf(95,11) == 1;
	question = "_I am looking for a missing crystal. It belongs to Elspeth._";
	text1 = "He looks nervous. _Oh. I see. I'm sure I know nothing about it._";

begintalknode;
	state = 7;
	nextstate = -1;
	question = "_Oh, all right. Never mind._";
	text1 = "_Yes, well, honest mistake. Good day._ He shuffles away.";
	action = END_TALK;

begintalknode;
	state = 7;
	nextstate = -1;
	condition = get_prestige() >= 20;
	question = "_Are you sure that you didn't take it?_";
	text1 = "_If you were any less experienced, I would destroy you for your insolence. As it is, I will just say that one of my specters has been very secretive lately. If you can speak with it, it might be able to help you._";
	text3 = "_That is all I have to say. Leave me be._";
	action = END_TALK;	
	code =
		relocate_char(get_pc_id(0),16,36,FALSE);
		relocate_char(get_pc_id(1),17,36,FALSE);
		relocate_char(get_pc_id(2),17,37,FALSE);
		relocate_char(get_pc_id(3),16,37,FALSE);
	break;


begintalknode;
	state = 7;
	nextstate = -1;
	condition = get_prestige() < 20;
	question = "_Are you sure that you didn't take it?_";
	text1 = "He looks at you with disdain. _You accuse me? In my home? You novice adventurer? Begone!_ He waves a hand, and you are elsewhere.";
	action = END_TALK;	
	code =
		relocate_char(get_pc_id(0),16,36,FALSE);
		relocate_char(get_pc_id(1),17,36,FALSE);
		relocate_char(get_pc_id(2),17,37,FALSE);
		relocate_char(get_pc_id(3),16,37,FALSE);
	break;

// Horrid Specter

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Horrid Specter";
	text1 = "You see a horrid, shadowy specter, lurking back in an isolated nook of the lighthouse. It watches you hungrily. You ask its name. It hisses, _I have no name any longer. I just am!_";
	text5 = "The horrid, shadowy specter continues to watch you hungrily. ";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_Why are you here, specter?_";
	text1 = "_I wait here, for my chance for vengeance!_";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Vengeance on who?_";
	text1 = "_Nekaros created me! He tried to bind me! I was too strong. Now, I want revenge on all pathetic living things!_";

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_Oh. Maybe I should be going._ Run away.";
	text1 = "You run off before the specter gets angry enough to attack. Happily, ";
	action = END_TALK;

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_All living things? Even me?_";
	text1 = "_Yes, like you!_ It hisses hungrily, and attacks.";
	action = END_TALK;
	code =
		set_attitude(9417,10);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(95,11) == 1;
	question = "_We're looking for a stolen crystal. Do you have it?_";
	text1 = "_Yes! And, now that you have found out my secret, I must feed upon your hot blood!_";
	action = END_TALK;
	code =
		set_attitude(9417,10);
	break;

